exports.text = (result,now, content)=> {
  return `<xml>
            <ToUserName><![CDATA[${result.FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${result.ToUserName}]]></FromUserName>
            <CreateTime>${now}</CreateTime>
            <MsgType><![CDATA[text]]></MsgType>
            <Content><![CDATA[${content}]]></Content>
            </xml>`
};
exports.img = (result,now, content)=> {
  return `<xml>
             <ToUserName><![CDATA[${result.FromUserName}]]></ToUserName>
             <FromUserName><![CDATA[${result.ToUserName}]]></FromUserName>
             <CreateTime>${now}</CreateTime>
             <MsgType><![CDATA[image]]></MsgType>
             <Image><MediaId><![CDATA[${content}]]></MediaId></Image>
             </xml>`;
};
exports.video = (result,now, content, desc)=> {
  let title = desc ? desc.title : 'title';
  let description = desc ? desc.description : 'description';
  return `<xml>
             <ToUserName><![CDATA[${result.FromUserName}]]></ToUserName>
             <FromUserName><![CDATA[${result.ToUserName}]]></FromUserName>
             <CreateTime>${now}</CreateTime>
             <MsgType><![CDATA[video]]></MsgType>
             <Video><MediaId><![CDATA[${content}]]></MediaId>
             <Title><![CDATA[${title}]]></Title>
             <Description><![CDATA[${description}]]></Description>
             </Video>
             </xml>`;
};
exports.link = (result,now, news)=> {
  return `<xml>
            <ToUserName><![CDATA[${result.FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${result.ToUserName}]]></FromUserName>
            <CreateTime>${now}</CreateTime>
            <MsgType><![CDATA[news]]></MsgType>
            <ArticleCount>1</ArticleCount>
            <Articles>
            <item><Title><![CDATA[${news[0].title}]]></Title> 
            <Description><![CDATA[${news[0].description}]]></Description>
            <PicUrl><![CDATA[${news[0].picUrl}]]></PicUrl>
            <Url><![CDATA[${news[0].url}]]></Url>
            </item>
            </Articles>
            </xml>`
};

